package com.test.aop;

import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class AfterService {
//    private static final Logger log = LoggerFactory.getLogger(AfterService.class);
//
//    @Resource
//    CustomPartMapper customPartMapper;
//
//    private final static String[] REMOVE_IBA_NAME = new String[]{"DESIGN_SOURCE","MATERIAL"};
//
//    @After(value = "execution(* com.hustcad.plm.pdm.partbom.service.saveas.TyplmSaveAsService.collectCadAndPartInfo(..))")
//    public void afterCollectCadAndPartInfo(JoinPoint joinPoint) {
//        Object[] args = joinPoint.getArgs();
//        BatchSaveAsObjectDTO batchSaveAsObjectDTO = (BatchSaveAsObjectDTO) args[0];
//        List<ObjectSaveAsDTO> objectSaveAsList = batchSaveAsObjectDTO.getObjectSaveAsList();
//        List<BigInteger> oidList = objectSaveAsList.stream()
//                .map(ObjectSaveAsDTO::getOid).collect(Collectors.toList());
//        log.info("objectSaveAsList::getOid=============>" + oidList.stream().map(BigInteger::toString)
//                .collect(Collectors.joining(",")));
//        int index = customPartMapper.removeIBAValue(oidList,REMOVE_IBA_NAME);
//        log.info("objectSaveAsList::removeIBAValue============>" + index);
//    }
}
